/*
 * DDSProjectView.java
 */

package com.guzzservices.easydomain.ui.frame;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.Timer;

import org.jdesktop.application.Action;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.TaskMonitor;

import com.guzzservices.easydomain.logic.NavPanelManager;
import com.guzzservices.easydomain.util.ComponentCenter;
import com.guzzservices.easydomain.util.HelpUtil;
import java.awt.Color;

/**
 * The application's main frame.
 */
public class DDSProjectView extends FrameView {

    public DDSProjectView(SingleFrameApplication app) {
        super(app);

        initComponents();

        initContent() ;

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String)(evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer)(evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });
    }

    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = DDSProjectApp.getApplication().getMainFrame();
            aboutBox = new DDSProjectAboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }
        DDSProjectApp.getApplication().show(aboutBox);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        splitPane = new javax.swing.JSplitPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jList1 = new javax.swing.JList();
        jScrollPane1 = new javax.swing.JScrollPane();
        rightMainPanel = new javax.swing.JScrollPane();
        jToolBar1 = new javax.swing.JToolBar();
        jLabel2 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        addTopDomain = new javax.swing.JButton();
        editTopDomain = new javax.swing.JButton();
        deleteTopDomain = new javax.swing.JButton();
        manageAName = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        manageAName1 = new javax.swing.JButton();
        manageAName2 = new javax.swing.JButton();
        manageAName3 = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem8 = new javax.swing.JMenuItem();
        javax.swing.JMenu fileMenu1 = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem1 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem2 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem3 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem4 = new javax.swing.JMenuItem();
        javax.swing.JMenu fileMenu2 = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem5 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem6 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem7 = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenuItem aboutMenuItem2 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem aboutMenuItem1 = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        domainADetailFrame = new javax.swing.JFrame();
        oneDomainADetail = new javax.swing.JSplitPane();
        jPanel2 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jToggleButton2 = new javax.swing.JToggleButton();
        jToggleButton3 = new javax.swing.JToggleButton();
        jButton2 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jLabel1 = new javax.swing.JLabel();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.guzzservices.easydomain.ui.frame.DDSProjectApp.class).getContext().getResourceMap(DDSProjectView.class);
        mainPanel.setBackground(resourceMap.getColor("mainPanel.background")); // NOI18N
        mainPanel.setName("mainPanel"); // NOI18N

        splitPane.setDividerLocation(140);
        splitPane.setDividerSize(3);
        splitPane.setName("splitPane"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setPreferredSize(new java.awt.Dimension(100, 184));
        jPanel1.setLayout(new java.awt.BorderLayout());

        jPanel3.setMinimumSize(new java.awt.Dimension(100, 150));
        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setPreferredSize(new java.awt.Dimension(100, 160));

        jList1.setBackground(resourceMap.getColor("jList1.background")); // NOI18N
        jList1.setBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jList1.border.lineColor"))); // NOI18N
        jList1.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "运行状态", "域名管理", "动态域名", "超值分享", "网站营销", "升级与设置" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jList1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList1.setCellRenderer(new com.guzzservices.easydomain.ui.render.NavListCellRender());
        ComponentCenter.setNavList(jList1);
        jList1.setMinimumSize(new java.awt.Dimension(52, 150));
        jList1.setName("jList1"); // NOI18N
        jList1.setPreferredSize(new java.awt.Dimension(52, 150));
        jList1.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                NavListValueChangeListener(evt);
            }
        });
        jList1.setSelectedIndex(0);

        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jList1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                .add(jList1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 160, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel1.add(jPanel3, java.awt.BorderLayout.NORTH);

        jScrollPane1.setHorizontalScrollBar(null);
        jScrollPane1.setName("jScrollPane1"); // NOI18N
        jScrollPane1.setWheelScrollingEnabled(false);
        jPanel1.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        splitPane.setLeftComponent(jPanel1);

        rightMainPanel.setBackground(resourceMap.getColor("rightMainPanel.background")); // NOI18N
        rightMainPanel.setName("rightMainPanel"); // NOI18N
        splitPane.setRightComponent(rightMainPanel);

        jToolBar1.setBackground(resourceMap.getColor("jToolBar1.background")); // NOI18N
        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);
        jToolBar1.setMargin(new java.awt.Insets(0, 2, 0, 1));
        jToolBar1.setName("jToolBar1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        jToolBar1.add(jLabel2);

        jSeparator2.setName("jSeparator2"); // NOI18N
        jToolBar1.add(jSeparator2);

        addTopDomain.setAction(new com.guzzservices.easydomain.ui.frame.action.AddTopDomainAction());
        addTopDomain.setBackground(resourceMap.getColor("addTopDomain.background")); // NOI18N
        addTopDomain.setText(resourceMap.getString("addTopDomain.text")); // NOI18N
        addTopDomain.setFocusable(false);
        addTopDomain.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        addTopDomain.setName("addTopDomain"); // NOI18N
        addTopDomain.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(addTopDomain);

        editTopDomain.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.EditTopDomainAction()));
        editTopDomain.setBackground(resourceMap.getColor("editTopDomain.background")); // NOI18N
        editTopDomain.setText(resourceMap.getString("editTopDomain.text")); // NOI18N
        editTopDomain.setFocusable(false);
        editTopDomain.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        editTopDomain.setName("editTopDomain"); // NOI18N
        editTopDomain.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(editTopDomain);

        deleteTopDomain.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.DeleteTopDomainAction()));
        deleteTopDomain.setBackground(resourceMap.getColor("deleteTopDomain.background")); // NOI18N
        deleteTopDomain.setText(resourceMap.getString("deleteTopDomain.text")); // NOI18N
        deleteTopDomain.setFocusable(false);
        deleteTopDomain.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        deleteTopDomain.setName("deleteTopDomain"); // NOI18N
        deleteTopDomain.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(deleteTopDomain);

        manageAName.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.ManageTopDomainARecordsAction()));
        manageAName.setBackground(resourceMap.getColor("manageAName.background")); // NOI18N
        manageAName.setText(resourceMap.getString("manageAName.text")); // NOI18N
        manageAName.setFocusable(false);
        manageAName.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        manageAName.setName("manageAName"); // NOI18N
        manageAName.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(manageAName);

        jSeparator1.setName("jSeparator1"); // NOI18N
        jToolBar1.add(jSeparator1);

        manageAName1.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.dynamicdomain.ActiveDDAction()));
        manageAName1.setBackground(resourceMap.getColor("manageAName1.background")); // NOI18N
        manageAName1.setText(resourceMap.getString("manageAName1.text")); // NOI18N
        manageAName1.setFocusable(false);
        manageAName1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        manageAName1.setName("manageAName1"); // NOI18N
        manageAName1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(manageAName1);

        manageAName2.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.dynamicdomain.PauseDDAction()));
        manageAName2.setBackground(resourceMap.getColor("manageAName2.background")); // NOI18N
        manageAName2.setText(resourceMap.getString("manageAName2.text")); // NOI18N
        manageAName2.setFocusable(false);
        manageAName2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        manageAName2.setName("manageAName2"); // NOI18N
        manageAName2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(manageAName2);

        manageAName3.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.dynamicdomain.DeleteDDAction()));
        manageAName3.setBackground(resourceMap.getColor("manageAName3.background")); // NOI18N
        manageAName3.setText(resourceMap.getString("manageAName3.text")); // NOI18N
        manageAName3.setFocusable(false);
        manageAName3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        manageAName3.setName("manageAName3"); // NOI18N
        manageAName3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(manageAName3);

        org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, splitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1012, Short.MAX_VALUE)
            .add(jToolBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1012, Short.MAX_VALUE)
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup()
                .add(jToolBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(splitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 546, Short.MAX_VALUE))
        );

        menuBar.setBackground(resourceMap.getColor("menuBar.background")); // NOI18N
        menuBar.setMargin(new java.awt.Insets(2, 1, 3, 1));
        menuBar.setName("menuBar"); // NOI18N
        menuBar.setPreferredSize(new java.awt.Dimension(74, 25));

        fileMenu.setBackground(resourceMap.getColor("fileMenu.background")); // NOI18N
        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(com.guzzservices.easydomain.ui.frame.DDSProjectApp.class).getContext().getActionMap(DDSProjectView.class, this);
        exitMenuItem.setAction(actionMap.get("miniToSystemTray")); // NOI18N
        exitMenuItem.setBackground(resourceMap.getColor("exitMenuItem.background")); // NOI18N
        exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        exitMenuItem.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu.add(exitMenuItem);

        exitMenuItem8.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem8.setBackground(resourceMap.getColor("exitMenuItem8.background")); // NOI18N
        exitMenuItem8.setText(resourceMap.getString("exitMenuItem8.text")); // NOI18N
        exitMenuItem8.setName("exitMenuItem8"); // NOI18N
        exitMenuItem8.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu.add(exitMenuItem8);

        menuBar.add(fileMenu);

        fileMenu1.setBackground(resourceMap.getColor("fileMenu1.background")); // NOI18N
        fileMenu1.setText(resourceMap.getString("fileMenu1.text")); // NOI18N
        fileMenu1.setName("fileMenu1"); // NOI18N

        exitMenuItem1.setAction(new com.guzzservices.easydomain.ui.frame.action.AddTopDomainAction());
        exitMenuItem1.setBackground(resourceMap.getColor("exitMenuItem1.background")); // NOI18N
        exitMenuItem1.setText(resourceMap.getString("exitMenuItem1.text")); // NOI18N
        exitMenuItem1.setName("exitMenuItem1"); // NOI18N
        exitMenuItem1.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu1.add(exitMenuItem1);

        exitMenuItem2.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.EditTopDomainAction()));
        exitMenuItem2.setBackground(resourceMap.getColor("exitMenuItem2.background")); // NOI18N
        exitMenuItem2.setText(resourceMap.getString("exitMenuItem2.text")); // NOI18N
        exitMenuItem2.setName("exitMenuItem2"); // NOI18N
        exitMenuItem2.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu1.add(exitMenuItem2);

        exitMenuItem3.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.DeleteTopDomainAction()));
        exitMenuItem3.setBackground(resourceMap.getColor("exitMenuItem3.background")); // NOI18N
        exitMenuItem3.setText(resourceMap.getString("exitMenuItem3.text")); // NOI18N
        exitMenuItem3.setName("exitMenuItem3"); // NOI18N
        exitMenuItem3.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu1.add(exitMenuItem3);

        exitMenuItem4.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.ManageTopDomainARecordsAction()));
        exitMenuItem4.setBackground(resourceMap.getColor("exitMenuItem4.background")); // NOI18N
        exitMenuItem4.setText(resourceMap.getString("exitMenuItem4.text")); // NOI18N
        exitMenuItem4.setName("exitMenuItem4"); // NOI18N
        exitMenuItem4.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu1.add(exitMenuItem4);

        menuBar.add(fileMenu1);

        fileMenu2.setBackground(resourceMap.getColor("fileMenu2.background")); // NOI18N
        fileMenu2.setText(resourceMap.getString("fileMenu2.text")); // NOI18N
        fileMenu2.setName("fileMenu2"); // NOI18N

        exitMenuItem5.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.dynamicdomain.ActiveDDAction()));
        exitMenuItem5.setBackground(resourceMap.getColor("exitMenuItem5.background")); // NOI18N
        exitMenuItem5.setText(resourceMap.getString("exitMenuItem5.text")); // NOI18N
        exitMenuItem5.setName("exitMenuItem5"); // NOI18N
        exitMenuItem5.setPreferredSize(new java.awt.Dimension(120, 21));
        fileMenu2.add(exitMenuItem5);

        exitMenuItem6.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.dynamicdomain.PauseDDAction()));
        exitMenuItem6.setBackground(resourceMap.getColor("exitMenuItem6.background")); // NOI18N
        exitMenuItem6.setText(resourceMap.getString("exitMenuItem6.text")); // NOI18N
        exitMenuItem6.setName("exitMenuItem6"); // NOI18N
        exitMenuItem6.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu2.add(exitMenuItem6);

        exitMenuItem7.setAction(ComponentCenter.getInstance().registerSwingAction(new com.guzzservices.easydomain.ui.frame.action.dynamicdomain.DeleteDDAction()));
        exitMenuItem7.setBackground(resourceMap.getColor("exitMenuItem7.background")); // NOI18N
        exitMenuItem7.setText(resourceMap.getString("exitMenuItem7.text")); // NOI18N
        exitMenuItem7.setName("exitMenuItem7"); // NOI18N
        exitMenuItem7.setPreferredSize(new java.awt.Dimension(97, 21));
        fileMenu2.add(exitMenuItem7);

        menuBar.add(fileMenu2);

        helpMenu.setBackground(resourceMap.getColor("helpMenu.background")); // NOI18N
        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("openSoftwareMainSite")); // NOI18N
        aboutMenuItem.setBackground(resourceMap.getColor("aboutMenuItem.background")); // NOI18N
        aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        aboutMenuItem.setPreferredSize(new java.awt.Dimension(185, 21));
        helpMenu.add(aboutMenuItem);

        aboutMenuItem2.setAction(actionMap.get("lookForMoreHelp")); // NOI18N
        aboutMenuItem2.setBackground(resourceMap.getColor("aboutMenuItem2.background")); // NOI18N
        aboutMenuItem2.setText(resourceMap.getString("aboutMenuItem2.text")); // NOI18N
        aboutMenuItem2.setName("aboutMenuItem2"); // NOI18N
        aboutMenuItem2.setPreferredSize(new java.awt.Dimension(85, 21));
        helpMenu.add(aboutMenuItem2);

        aboutMenuItem1.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem1.setBackground(resourceMap.getColor("aboutMenuItem1.background")); // NOI18N
        aboutMenuItem1.setText(resourceMap.getString("aboutMenuItem1.text")); // NOI18N
        aboutMenuItem1.setName("aboutMenuItem1"); // NOI18N
        aboutMenuItem1.setPreferredSize(new java.awt.Dimension(85, 21));
        helpMenu.add(aboutMenuItem1);

        menuBar.add(helpMenu);

        statusPanel.setName("statusPanel"); // NOI18N
        statusPanel.setPreferredSize(new java.awt.Dimension(989, 28));

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        statusMessageLabel.setText(resourceMap.getString("statusMessageLabel.text")); // NOI18N
        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progressBar.setEnabled(false);
        progressBar.setName("progressBar"); // NOI18N

        org.jdesktop.layout.GroupLayout statusPanelLayout = new org.jdesktop.layout.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(statusPanelLayout.createSequentialGroup()
                .add(24, 24, 24)
                .add(statusMessageLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 870, Short.MAX_VALUE)
                .add(23, 23, 23)
                .add(statusAnimationLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
            .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1012, Short.MAX_VALUE)
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(statusPanelLayout.createSequentialGroup()
                .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(statusMessageLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(statusAnimationLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        domainADetailFrame.setName("domainADetailFrame"); // NOI18N

        oneDomainADetail.setName("oneDomainADetail"); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N

        jToggleButton2.setText(resourceMap.getString("jToggleButton2.text")); // NOI18N
        jToggleButton2.setName("jToggleButton2"); // NOI18N

        jToggleButton3.setText(resourceMap.getString("jToggleButton3.text")); // NOI18N
        jToggleButton3.setName("jToggleButton3"); // NOI18N

        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
                        .add(jButton2)
                        .add(jToggleButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jButton1))
                    .add(jToggleButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel2Layout.linkSize(new java.awt.Component[] {jButton1, jButton2, jToggleButton3}, org.jdesktop.layout.GroupLayout.HORIZONTAL);

        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .add(26, 26, 26)
                .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(53, 53, 53)
                .add(jToggleButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(31, 31, 31)
                .add(jToggleButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(33, 33, 33)
                .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(35, Short.MAX_VALUE))
        );

        jPanel2Layout.linkSize(new java.awt.Component[] {jButton1, jButton2, jToggleButton3}, org.jdesktop.layout.GroupLayout.VERTICAL);

        oneDomainADetail.setLeftComponent(jPanel2);

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        jScrollPane2.setViewportView(jLabel1);

        oneDomainADetail.setRightComponent(jScrollPane2);

        org.jdesktop.layout.GroupLayout domainADetailFrameLayout = new org.jdesktop.layout.GroupLayout(domainADetailFrame.getContentPane());
        domainADetailFrame.getContentPane().setLayout(domainADetailFrameLayout);
        domainADetailFrameLayout.setHorizontalGroup(
            domainADetailFrameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(domainADetailFrameLayout.createSequentialGroup()
                .addContainerGap()
                .add(oneDomainADetail, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                .addContainerGap())
        );
        domainADetailFrameLayout.setVerticalGroup(
            domainADetailFrameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(oneDomainADetail, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);
    }// </editor-fold>//GEN-END:initComponents

    private void NavListValueChangeListener(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_NavListValueChangeListener
       int index = this.jList1.getSelectedIndex() ;
       this.rightMainPanel.setViewportView(NavPanelManager.getInstance().getPanel(index));
    }//GEN-LAST:event_NavListValueChangeListener

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addTopDomain;
    private javax.swing.JButton deleteTopDomain;
    private javax.swing.JFrame domainADetailFrame;
    private javax.swing.JButton editTopDomain;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JList jList1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JToggleButton jToggleButton2;
    private javax.swing.JToggleButton jToggleButton3;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JButton manageAName;
    private javax.swing.JButton manageAName1;
    private javax.swing.JButton manageAName2;
    private javax.swing.JButton manageAName3;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JSplitPane oneDomainADetail;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JScrollPane rightMainPanel;
    private javax.swing.JSplitPane splitPane;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    // End of variables declaration//GEN-END:variables

    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;

    private JDialog aboutBox;

    private com.guzzservices.easydomain.ui.panel.URLLoadAndShowPanel htmlPane ;

    protected void initContent(){
        htmlPane = new com.guzzservices.easydomain.ui.panel.URLLoadAndShowPanel("http://share.guzzservices.com/easydomain/left/?source=client");
        htmlPane.setBackground(Color.white) ;
        jScrollPane1.setViewportView(htmlPane);
        
        DDSProjectApp.registerURLLoadAndShowPanel(htmlPane) ;
    }

    public JScrollPane getRightMainPanel() {
        return rightMainPanel;
    }

    public JLabel getStatusMessageLabel() {
        return statusMessageLabel;
    }

    public void setMainViewToSettings(){
        jList1.setSelectedIndex(5) ;
    }

    @Action
    public void openSoftwareMainSite() {
        HelpUtil.openURLInSystemBroswer("http://code.google.com/p/easydomain/") ;
    }

    @Action
    public void lookForMoreHelp() {
        HelpUtil.openURLInSystemBroswer("http://code.google.com/p/easydomain/w/list") ;
    }

}
